<!DOCTYPE html>
<html lang="en" style="height: 100%">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

<body style="height: 100%; margin: 0">

  <div id="container" style="height: 100%"></div>
  <script type="text/javascript" src="echarts.js"></script>
  <script type="text/javascript">

    function echartsInit(option) {
      var myChart = echarts.init(document.getElementById('container'));
      if (option && typeof option === 'object') {
        myChart.setOption(option);
      }
      window.addEventListener('resize', myChart.resize);
    }

  </script>
</body>

</html>